<template>
<t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
    </t-image-viewer>
    <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
    </van-image-preview>
  <div class="outline-parent jy-style-height border-hover-style outline-style2">
    
    <t-popup
      class="placement bottom center"
      attach="#attach"
      content="查看本单元全景展厅"
      placement="bottom"
      showArrow
      destroyOnClose
      v-if="props.info.digitalShowroom"
    >
      <img
        class="icon-3d"
        id="outlineIcon blinking-animation-style"
        @click="open(props.info.digitalShowroom)"
        :src="publicUrls + 'free/style2/3dIcon.png'"
      />
    </t-popup>

    <div class="outline-cover">
      <img
        v-if="props.info.value"
        @click="ImgVisible = true"
        :src="urls + props.info.value + '?imageView2/3/format/webp'"
        alt=""
      />
    </div>
    <div class="line"></div>
    <img class="shadow" :src="publicUrls + 'free/style2/firstLevelOutline1Shadow.png?imageView2/3/format/webp'" alt="" />
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'free2Style3',
});
</script>

<script setup lang="ts">
import ExpandableText from './../../../textMode/ExpandableText.vue';
import { publicUrls } from '@/utils/minxin';
import { getTextHtml } from '@/utils/minxin';
import { urls } from '@/utils/request/upload';
import { defineComponent, nextTick, ref } from 'vue';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { useProjectStore } from '@/store';

const ImgVisible = ref(false);
const store = useProjectStore();

const props = defineProps({
  info: {
    type: Object,
  },
});

// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin-right: 90px;
  margin-top: 0;
  margin-left: 120px;
}

.shadow {
  width: 764px;
  height: 210px;
  position: absolute;
  bottom: 0;
  left: 0;
}
.icon-3d {
  width: 48px;
  height: 58px;
  object-fit: contain;
  position: absolute;
  top: -6px;
  right: 60px;
  z-index: 21;
}
.outline-cover {
  width: 554px;
  height: 100%;
  background: #99b9b6;
  position: relative;
  z-index: 12;
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.line {
  width: 10px;
  height: 100%;
  background: #2f2a2a;
  flex-shrink: 0;
}
</style>